#include<bits/stdc++.h>

using namespace std;

int rev(int n) {//n=123
    int m = 0, d;
    while (n > 0) {
        d = n % 10;
        m = m * 10 + d;
        n /= 10;
    }
    return m;
}

int sys(int n) {
    if (n == rev(n))return 1;
    else return 0;
}

int main() {
    cout << (sys(123) == 0) << endl;// expectedValue== actualValue
    cout << (sys(121) == 1) << endl;//1
    cout << (sys(1) == 1) << endl;//1
    cout << (sys(100) == 0) << endl;//1
    return 0;
}
